<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>智能运动耳机</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"/>
<meta content="yes" name="apple-mobile-web-app-capable" />
<meta content="black" name="apple-mobile-web-app-status-bar-style" />
<meta content="telephone=no" name="format-detection" />
<meta name="keywords" content="">
<meta name="description" content="">
{load_css file="css/base.css"}
{load_css file="css/m-earphone.css"}
{load_js file="jquery-1.11.1.min.js"}
{load_js file="common.js"}
</head>

<body>
  <div id="wrap">
    <div class="ear_submit">
      <div class="ear_box">
        <form action="{AnUrl('events/rockrun/save')}" method="post" class="js_rockrun_form">
          <label class="ear_text1">
            <span><img src="{$smarty.const.STATIC_URL}/images/ear-img/txt_1.png" /></span>
            <input type="text" name="realname" class="js_realname"/>
          </label>
          <label class="ear_text2">
            <span><img src="{$smarty.const.STATIC_URL}/images/ear-img/txt_2.png" /></span>
            <input type="text" name="mobile" class="js_mobile"/>
          </label>
          <label class="ear_text3">
            <span><img src="{$smarty.const.STATIC_URL}/images/ear-img/txt_3.png" /></span>
            <input type="text" name="email" class="js_email" />
          </label>
        </form>
      </div>

      <div class="submit_btn js_submit"><a href="javascript:void(0);"><img src="{$smarty.const.STATIC_URL}/images/ear-img/btn.png" /></a></div>
    </div>
  </div>
  <!--wrap end--> 
  <script type="text/javascript">
    $(function(){
        $('.js_submit').on('touchstart', function(){
            var realname = htmlSpecialChars($.trim($('.js_realname').val()));
            var mobile = htmlSpecialChars($.trim($('.js_mobile').val()));
            var email = htmlSpecialChars($.trim($('.js_email').val()));

            if(!realname || !mobile || !email) {
              alert('抱歉，所有选项都必须填写！');
              return;
            }

            if(!checkStr(mobile, 'mobile')) {
              alert('抱歉，您的手机号格式不正确！');
              return;
            }

            if(!checkStr(email, 'mail')) {
              alert('抱歉，您的邮箱格式不正确！')
              return;
            }

            $('.js_rockrun_form').submit();
        });
    });
  </script>
</body>
</html>

